Skip to content

Conversation

@solidsnakedev
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 9, 2025 21:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors byte handling utilities to leverage the Effect library's built-in Schema.Uint8ArrayFromHex schema instead of custom implementations. The changes eliminate redundant code, improve maintainability, and standardize hex-to-bytes conversions across the codebase.

Key Changes:

  • Replaced custom Bytes.FromHex with Schema.Uint8ArrayFromHex throughout the codebase
  • Simplified byte utility modules by removing custom hex validation and conversion logic
  • Updated equality function naming from bytesEquals to equals for consistency
  • Refactored various BytesN modules to use simpler schema compositions

Reviewed changes

Copilot reviewed 300 out of 359 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/evolution/src/core/Bytes.ts Removed extensive custom hex conversion logic; simplified to use Effect's native schemas
packages/evolution/src/core/EnterpriseAddress.ts Updated to use Schema.Uint8ArrayFromHex instead of Bytes.FromHex
packages/evolution/src/core/Ed25519Signature.ts Changed equality check to use Bytes.equals
packages/evolution/src/core/DnsName.ts Refactored to use simplified Text128 schemas and point-free function style
packages/evolution/src/core/DataJson.ts Introduced local HEX_REGEX to replace Bytes.isHex
packages/evolution/src/core/CBOR.ts Updated CBOR hex conversion to use Schema.Uint8ArrayFromHex and Bytes.fromHex
packages/evolution/src/core/Bytes96.ts Simplified schema definitions by removing custom transformation logic
packages/evolution/src/core/Combinator.ts Replaced Bytes.isHex with local HEX_REGEX.test
Various address/certificate files Consistently updated to use Schema.Uint8ArrayFromHex
Documentation files Updated nav_order values and type signatures to reflect schema changes
packages/evolution/package.json Added @emurgo/cardano-message-signing-nodejs dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@solidsnakedev solidsnakedev merged commit b0d1202 into main Dec 9, 2025
5 checks passed
@solidsnakedev solidsnakedev deleted the refactor/bytes branch December 9, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants